#ifndef OPTIONWINDOW_H
#define OPTIONWINDOW_H

#include <wx/propdlg.h>
#include <wx/generic/propdlg.h>
#include <wx/bookctrl.h>

#include "tux.h"
#include "MainFrame.h"

class ConfigWindow : public wxPropertySheetDialog
{
private:
	MainFrame* mainFrame;

private:
	wxTextCtrl* nameTextCtrl;
	wxTextCtrl* messageTextCtrl;

	wxCheckBox* showTimeCheckBox;
    wxCheckBox* newLineCheckBox;

	wxRadioButton* enterRadioButton;
	wxRadioButton* shiftEnterRadioButton;

	//history
	wxCheckBox* historyCheckBox;
	wxTextCtrl* historyFolderTextCtrl;
	wxButton* historyFolderButton;

	//file transfer
	wxTextCtrl* ftFolderTextCtrl;
	wxButton* ftFolderButton;

	//connection
	wxRadioButton* directRadioButton;
	wxRadioButton* httpRadioButton;
	wxRadioButton* httpProxyRadioButton;

	wxTextCtrl* httpProxyAddressTextCtrl;
	wxTextCtrl* httpProxyPortTextCtrl;
	wxTextCtrl* httpProxyUsernameTextCtrl;
	wxTextCtrl* httpProxyPasswordTextCtrl;

public:
     ConfigWindow(MainFrame* frame);
    ~ConfigWindow();
    void LoadSettings();
    void SaveSettings();

private:
    wxPanel* CreatePersonalPage(wxWindow* parent);
    wxPanel* CreateMessagePage(wxWindow* parent);

	wxPanel* CreateFileTransferPage(wxWindow* parent);

	wxPanel* CreateConnectionPage(wxWindow* parent);

	void UpdateUIStatus();

private:
	void OnButtonHistoryFolder(wxCommandEvent& event);
	void OnCheckBoxHistory(wxCommandEvent& event);

	void OnButtonFileTransferFolder(wxCommandEvent& event);

	void OnConnectionButton(wxCommandEvent& event);

DECLARE_EVENT_TABLE()
};


#endif
